import React from "react"
import Footer from "./components/Footer"
import Home from "./views/Home"
import Nav from "./components/Nav"
import Article from "./views/Article"
import {HashRouter, Route, Switch} from "react-router-dom"

/**
 * 主组件App
 */
export default class App extends React.Component {
    render() {
        return (
            <div className="app" style={{paddingTop: "96px"}}>
                <HashRouter>
                    <Nav />
                    <Switch>
                        <Route path="/article/:id" component={Article} exact />
                        <Route path="/" component={Home}/>
                    </Switch>
                    <Footer />
                </HashRouter>
            </div>
        )
    }
}